const express = require('express')
const router = express.Router()
 
// 导入用户路由处理函数模块
const commonityHandler = require('../router_handler/commonity')
 
// 获取
router.get('/getList', commonityHandler.getlist)
// 增加
router.post('/AddList', commonityHandler.AddList)
// 删除
router.post('/removeList', commonityHandler.removeList)
// 修改
router.post('/updateList', commonityHandler.updateList)
// 获取所有数据(回收站)
router.get('/getalllist', commonityHandler.getAllList)
// 彻底删除商品
router.post('/deleteList', commonityHandler.deleteList)
// 恢复商品
router.post('/recoverList', commonityHandler.recoverList)
router.post('/addSwiper', commonityHandler.addSwiper)


// 审核中的商品
router.get('/checkList', commonityHandler.checkList)
// 出售中(审核通过的商品)
router.get('/checkTrue', commonityHandler.checkTrue)
// 已下架的商品(商品状态为0)
router.get('/stateList', commonityHandler.stateList)
// 库存警告
router.get('/inventoryWarn', commonityHandler.inventoryWarn)


module.exports = router